/*
 Navicat Premium Dump SQL

 Source Server         : 127.0.0.1
 Source Server Type    : MySQL
 Source Server Version : 50744 (5.7.44)
 Source Host           : 127.0.0.1:3306
 Source Schema         : smart_community

 Target Server Type    : MySQL
 Target Server Version : 50744 (5.7.44)
 File Encoding         : 65001

 Date: 07/08/2025 09:42:30
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sc_login_log
-- ----------------------------
DROP TABLE IF EXISTS `sc_login_log`;
CREATE TABLE `sc_login_log` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'æ—¥å¿—ID',
  `user_id` bigint(20) NOT NULL COMMENT 'ç”¨æˆ·ID',
  `username` varchar(50) NOT NULL COMMENT 'ç”¨æˆ·å',
  `login_ip` varchar(50) DEFAULT NULL COMMENT 'ç™»å½•IP',
  `login_address` varchar(255) DEFAULT NULL COMMENT '登录地址',
  `browser` varchar(500) DEFAULT NULL COMMENT '浏览器信息',
  `os` varchar(100) DEFAULT NULL COMMENT 'æ“ä½œç³»ç»Ÿ',
  `device_type` tinyint(4) DEFAULT NULL COMMENT 'è®¾å¤‡ç±»åž‹ï¼š1-PCï¼Œ2-æ‰‹æœºï¼Œ3-å¹³æ¿',
  `login_status` tinyint(4) NOT NULL COMMENT 'ç™»å½•çŠ¶æ€ï¼š1-æˆåŠŸï¼Œ2-å¤±è´¥',
  `login_message` varchar(255) DEFAULT NULL COMMENT 'ç™»å½•æ¶ˆæ¯',
  `login_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'ç™»å½•æ—¶é—´',
  `status` tinyint(4) DEFAULT '1' COMMENT 'çŠ¶æ€ï¼Œä½œè€…ï¼šWu.Liang',
  `create_by` bigint(20) DEFAULT NULL COMMENT 'åˆ›å»ºäººï¼Œä½œè€…ï¼šWu.Liang',
  `create_time` datetime DEFAULT NULL COMMENT 'åˆ›å»ºæ—¶é—´ï¼Œä½œè€…ï¼šWu.Liang',
  `login_type` tinyint(4) DEFAULT '1' COMMENT '登录类型：1-用户名密码，2-手机验证码，3-邮箱验证码，4-第三方登录',
  `logout_time` datetime DEFAULT NULL COMMENT '登出时间',
  `online_duration` bigint(20) DEFAULT '0' COMMENT '在线时长（秒）',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` tinyint(4) DEFAULT '0' COMMENT '是否删除：0-否，1-是',
  `update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
  `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '备注',
  PRIMARY KEY (`id`),
  KEY `idx_user_id` (`user_id`),
  KEY `idx_username` (`username`),
  KEY `idx_login_time` (`login_time`),
  KEY `idx_login_status` (`login_status`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COMMENT='ç™»å½•æ—¥å¿—è¡¨';

-- ----------------------------
-- Records of sc_login_log
-- ----------------------------
BEGIN;
INSERT INTO `sc_login_log` (`id`, `user_id`, `username`, `login_ip`, `login_address`, `browser`, `os`, `device_type`, `login_status`, `login_message`, `login_time`, `status`, `create_by`, `create_time`, `login_type`, `logout_time`, `online_duration`, `update_time`, `deleted`, `update_by`, `remark`) VALUES (1, 9, 'gufeiya', '0:0:0:0:0:0:0:1%0', NULL, 'Chrome', 'Linux', NULL, 0, '登录成功', '2025-08-05 16:22:36', 1, NULL, '2025-08-05 16:22:36', 1, NULL, 0, '2025-08-05 16:22:36', 0, NULL, NULL);
INSERT INTO `sc_login_log` (`id`, `user_id`, `username`, `login_ip`, `login_address`, `browser`, `os`, `device_type`, `login_status`, `login_message`, `login_time`, `status`, `create_by`, `create_time`, `login_type`, `logout_time`, `online_duration`, `update_time`, `deleted`, `update_by`, `remark`) VALUES (2, 9, 'gufeiya', '0:0:0:0:0:0:0:1%0', NULL, 'Chrome', 'Linux', NULL, 0, '登录成功', '2025-08-05 16:27:50', 1, NULL, '2025-08-05 16:27:50', 1, NULL, 0, '2025-08-05 16:27:50', 0, NULL, NULL);
INSERT INTO `sc_login_log` (`id`, `user_id`, `username`, `login_ip`, `login_address`, `browser`, `os`, `device_type`, `login_status`, `login_message`, `login_time`, `status`, `create_by`, `create_time`, `login_type`, `logout_time`, `online_duration`, `update_time`, `deleted`, `update_by`, `remark`) VALUES (3, 9, 'gufeiya', '0:0:0:0:0:0:0:1%0', NULL, 'Chrome', 'Linux', NULL, 0, '登录成功', '2025-08-05 17:02:33', 1, NULL, '2025-08-05 17:02:33', 1, NULL, 0, '2025-08-05 17:02:33', 0, NULL, NULL);
INSERT INTO `sc_login_log` (`id`, `user_id`, `username`, `login_ip`, `login_address`, `browser`, `os`, `device_type`, `login_status`, `login_message`, `login_time`, `status`, `create_by`, `create_time`, `login_type`, `logout_time`, `online_duration`, `update_time`, `deleted`, `update_by`, `remark`) VALUES (4, 9, 'gufeiya', '0:0:0:0:0:0:0:1%0', NULL, 'Chrome', 'Linux', NULL, 0, '登录成功', '2025-08-06 13:48:35', 1, NULL, '2025-08-06 13:48:35', 1, NULL, 0, '2025-08-06 13:48:35', 0, NULL, NULL);
INSERT INTO `sc_login_log` (`id`, `user_id`, `username`, `login_ip`, `login_address`, `browser`, `os`, `device_type`, `login_status`, `login_message`, `login_time`, `status`, `create_by`, `create_time`, `login_type`, `logout_time`, `online_duration`, `update_time`, `deleted`, `update_by`, `remark`) VALUES (5, 9, 'gufeiya', '0:0:0:0:0:0:0:1%0', NULL, 'Chrome', 'Linux', NULL, 0, '登录成功', '2025-08-06 22:54:05', 1, NULL, '2025-08-06 22:54:05', 1, NULL, 0, '2025-08-06 22:54:05', 0, NULL, NULL);
INSERT INTO `sc_login_log` (`id`, `user_id`, `username`, `login_ip`, `login_address`, `browser`, `os`, `device_type`, `login_status`, `login_message`, `login_time`, `status`, `create_by`, `create_time`, `login_type`, `logout_time`, `online_duration`, `update_time`, `deleted`, `update_by`, `remark`) VALUES (6, 9, 'gufeiya', '0:0:0:0:0:0:0:1%0', NULL, 'Chrome', 'Linux', NULL, 0, '登录成功', '2025-08-06 23:05:52', 1, NULL, '2025-08-06 23:05:52', 1, NULL, 0, '2025-08-06 23:05:52', 0, NULL, NULL);
INSERT INTO `sc_login_log` (`id`, `user_id`, `username`, `login_ip`, `login_address`, `browser`, `os`, `device_type`, `login_status`, `login_message`, `login_time`, `status`, `create_by`, `create_time`, `login_type`, `logout_time`, `online_duration`, `update_time`, `deleted`, `update_by`, `remark`) VALUES (7, 9, 'gufeiya', '0:0:0:0:0:0:0:1%0', NULL, 'Chrome', 'Linux', NULL, 0, '登录成功', '2025-08-06 23:05:55', 1, NULL, '2025-08-06 23:05:55', 1, NULL, 0, '2025-08-06 23:05:55', 0, NULL, NULL);
INSERT INTO `sc_login_log` (`id`, `user_id`, `username`, `login_ip`, `login_address`, `browser`, `os`, `device_type`, `login_status`, `login_message`, `login_time`, `status`, `create_by`, `create_time`, `login_type`, `logout_time`, `online_duration`, `update_time`, `deleted`, `update_by`, `remark`) VALUES (8, 9, 'gufeiya', '0:0:0:0:0:0:0:1%0', NULL, 'Chrome', 'Linux', NULL, 0, '登录成功', '2025-08-06 23:05:59', 1, NULL, '2025-08-06 23:05:59', 1, NULL, 0, '2025-08-06 23:05:59', 0, NULL, NULL);
INSERT INTO `sc_login_log` (`id`, `user_id`, `username`, `login_ip`, `login_address`, `browser`, `os`, `device_type`, `login_status`, `login_message`, `login_time`, `status`, `create_by`, `create_time`, `login_type`, `logout_time`, `online_duration`, `update_time`, `deleted`, `update_by`, `remark`) VALUES (9, 9, 'gufeiya', '0:0:0:0:0:0:0:1%0', NULL, 'Chrome', 'Linux', NULL, 0, '登录成功', '2025-08-06 23:06:17', 1, NULL, '2025-08-06 23:06:17', 1, NULL, 0, '2025-08-06 23:06:17', 0, NULL, NULL);
INSERT INTO `sc_login_log` (`id`, `user_id`, `username`, `login_ip`, `login_address`, `browser`, `os`, `device_type`, `login_status`, `login_message`, `login_time`, `status`, `create_by`, `create_time`, `login_type`, `logout_time`, `online_duration`, `update_time`, `deleted`, `update_by`, `remark`) VALUES (10, 9, 'gufeiya', '0:0:0:0:0:0:0:1%0', NULL, 'Chrome', 'Linux', NULL, 0, '登录成功', '2025-08-06 23:12:10', 1, NULL, '2025-08-06 23:12:10', 1, NULL, 0, '2025-08-06 23:12:10', 0, NULL, NULL);
INSERT INTO `sc_login_log` (`id`, `user_id`, `username`, `login_ip`, `login_address`, `browser`, `os`, `device_type`, `login_status`, `login_message`, `login_time`, `status`, `create_by`, `create_time`, `login_type`, `logout_time`, `online_duration`, `update_time`, `deleted`, `update_by`, `remark`) VALUES (11, 9, 'gufeiya', '0:0:0:0:0:0:0:1%0', NULL, 'Chrome', 'Linux', NULL, 0, '登录成功', '2025-08-06 23:15:45', 1, NULL, '2025-08-06 23:15:45', 1, NULL, 0, '2025-08-06 23:15:45', 0, NULL, NULL);
INSERT INTO `sc_login_log` (`id`, `user_id`, `username`, `login_ip`, `login_address`, `browser`, `os`, `device_type`, `login_status`, `login_message`, `login_time`, `status`, `create_by`, `create_time`, `login_type`, `logout_time`, `online_duration`, `update_time`, `deleted`, `update_by`, `remark`) VALUES (12, 9, 'gufeiya', '0:0:0:0:0:0:0:1%0', NULL, 'Chrome', 'Linux', NULL, 0, '登录成功', '2025-08-07 09:16:54', 1, NULL, '2025-08-07 09:16:54', 1, NULL, 0, '2025-08-07 09:16:54', 0, NULL, NULL);
INSERT INTO `sc_login_log` (`id`, `user_id`, `username`, `login_ip`, `login_address`, `browser`, `os`, `device_type`, `login_status`, `login_message`, `login_time`, `status`, `create_by`, `create_time`, `login_type`, `logout_time`, `online_duration`, `update_time`, `deleted`, `update_by`, `remark`) VALUES (13, 9, 'gufeiya', '0:0:0:0:0:0:0:1%0', NULL, 'Chrome', 'Linux', NULL, 0, '登录成功', '2025-08-07 09:20:59', 1, NULL, '2025-08-07 09:20:59', 1, NULL, 0, '2025-08-07 09:20:59', 0, NULL, NULL);
INSERT INTO `sc_login_log` (`id`, `user_id`, `username`, `login_ip`, `login_address`, `browser`, `os`, `device_type`, `login_status`, `login_message`, `login_time`, `status`, `create_by`, `create_time`, `login_type`, `logout_time`, `online_duration`, `update_time`, `deleted`, `update_by`, `remark`) VALUES (14, 9, 'gufeiya', '0:0:0:0:0:0:0:1%0', NULL, 'Chrome', 'Linux', NULL, 0, '登录成功', '2025-08-07 09:37:36', 1, NULL, '2025-08-07 09:37:36', 1, NULL, 0, '2025-08-07 09:37:36', 0, NULL, NULL);
INSERT INTO `sc_login_log` (`id`, `user_id`, `username`, `login_ip`, `login_address`, `browser`, `os`, `device_type`, `login_status`, `login_message`, `login_time`, `status`, `create_by`, `create_time`, `login_type`, `logout_time`, `online_duration`, `update_time`, `deleted`, `update_by`, `remark`) VALUES (15, 24, 'admin', '0:0:0:0:0:0:0:1%0', NULL, 'Chrome', 'Linux', NULL, 0, '登录成功', '2025-08-07 09:37:46', 1, NULL, '2025-08-07 09:37:46', 1, NULL, 0, '2025-08-07 09:37:46', 0, NULL, NULL);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
